package com.yaperviy.dao.hibernate;

import java.util.List;

import com.yaperviy.dao.hibernate.GenericDaoHibernate;
import com.yaperviy.model.Car;
import com.yaperviy.dao.CarDao;

import org.springframework.stereotype.Repository;

//@Repository("carDao")
public class CarDaoHibernate extends GenericDaoHibernate<Car, Long> implements CarDao {

    public CarDaoHibernate() {
        super(Car.class);
    }

    public List<Car> findByBrand_id(Long brand_id) {
        return getHibernateTemplate().find("from Car where brand_id=?", brand_id);
    }
}
